{template 'header', 'member'}
<div class="warn">尊敬的<strong>{$MG[groupname]}</strong>，统计发布数据     <a href="javascript:window.print();" style="color:blue">[打印信息]</a></div>
<table width="100%" border="1" cellpadding="0" cellspacing="0"  bordercolordark="#cccccc" bordercolorlight="#FFFFFF" id="countww">
  <tr>
    <td width="10%" height="30" align="center">统计</td>
	{loop $data $k $v}
    <td width="10%" height="30" align="center"><a href="{DT_PATH}member/my.php?mid={$v}">{$MODULE[$v]['name']}</a></td>
	{/loop}
	<td width="10%" align="center">盘询</td>
	<td width="10%" align="center">信息</td>
	<td width="10%" align="center">资金</td>
	</tr>
  <tr>
    <td width="10%" height="30" align="center">今日</td>
	{loop $data $k $v}
    <td width="10%" height="30" align="center">
	<?php
		define('TIME', time());
		$time_start = strtotime(date('Y-m-d', TIME).' 00:00:00');
		$count = $db->count($DT_PRE.$MODULE[$v]['module'],"username = '$_username' and addtime>=$time_start");
	?>
	{$count}	</td>
	{/loop}
	<td width="10%" align="center">--</td>
	<td width="10%" align="center">--</td>
	<td width="10%" align="center">--</td>
	  </tr>
  <tr>
    <td width="10%" height="30" align="center">本周</td>
	{loop $data $k $v}
    <td width="10%" height="30" align="center">
	<?php
			$w = date('w', TIME);
			if($w == 0) $w = 7;
			$w--;
			$time_start = date('Y-m-d', TIME-86400*$w);
			$time_start = strtotime($time_start.' 00:00:00');
		$count = $db->count($DT_PRE.$MODULE[$v]['module'],"username = '$_username' and addtime>=$time_start");
	?>
	{$count}	</td>
	{/loop}
	<td width="10%" align="center">--</td>
	<td width="10%" align="center">--</td>
	<td width="10%" align="center">--</td>
	  </tr>
  <tr>
    <td width="10%" height="30" align="center">本月</td>
	{loop $data $k $v}
    <td width="10%" height="30" align="center">
	<?php
		$time_start = date('Y-m-0', TIME);
			$time_start = strtotime($time_start.' 00:00:00');
		$count = $db->count($DT_PRE.$MODULE[$v]['module'],"username = '$_username' and addtime>=$time_start");
	?>
	{$count}	</td>{/loop}
	<td width="10%" align="center">--</td>
	<td width="10%" align="center">--</td>
	<td width="10%" align="center">--</td>
	  </tr>
  <tr>
    <td width="10%" height="30" align="center">全部</td>
	{loop $data $k $v}
    <td width="10%" height="30" align="center">
	<?php
		$count = $db->count($DT_PRE.$MODULE[$v]['module'],"username = '$_username'");
	?>
	{$count}	</td>
	{/loop}
	<td width="10%" align="center">--</td>
	<td width="10%" align="center">--</td>
	<td width="10%" align="center">{$_money}</td>
	  </tr>
</table>
{template 'footer', 'member'}